import { formatTimestamp } from '../../utils/index'
Page({
    data: {
        userInfo: {},
    },

    handelLogout: function () {
        wx.clearStorage()
        wx.redirectTo({
            url: '/pages/login/login'
        });
    },
    onLoad() {
        wx.getStorage({
            key: 'userInfo',
            success: (res) => {
                this.setData({
                    userInfo: { Avatar: res.data.Avatar, RegistrationDate: formatTimestamp(res.data.RegistrationDate), Username: res.data.Username }
                });
            }
        });
    }
});
